package service

import "errors"

var (
	AccountRepeat            = "账户不能重复"
	EmailRepeat              = "邮箱不能重复"
	BcryptPassword           = "密码加密失败"
	RegisterFailed           = "用户注册失败"
	AccountNotExist          = "用户不存在"
	PasswordErr              = "原密码不正确"
	TokenCreateFailed        = "token生成失败"
	UpdateUserFailed         = "修改用户信息过程出现了错误"
	UpdateUserErr            = "修改用户信息过程出现了错误"
	UploadUserAvatar         = "上传用户头像失败"
	UpdateUserPasswordFailed = "修改用户密码失败"
	RedisKeyErr              = "没有对应的redis键"
	GetRedisDataFailed       = "从redis获取数据失败"
	EmailCodeErr             = "验证码不正确"
	SendEmailErr             = "邮箱验证码发送失败"
	StoreEmailErr            = "邮箱验证码缓存失败"
	GetEmailErr              = "邮箱不存在或查找失败"
	SendShortChainErr        = "邮箱发送短链失败"
	UploadAvatarFailed       = "头像上传失败"
	UserTokenFailed          = "userID断言失败,类型为%T"
)

func NewErr(str string) error {
	return errors.New(str)
}
